﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using Moon.Orm;
using System.Data;
namespace IDAL
{
    /// <summary>
    /// 泛型通用数据访问层接口的基接口
    /// </summary>
    public interface IBaseDao<T> where T : new()
    {
        Object Save(EntityBase id);
        void Update(EntityBase eb);
        long Delete(Field sqlwhere);
        long Delete(string sqlwhere);
        T GetByID(Field sqlwhere);
        long GetCount(Field sqlwhere);
        long GetCount(string sqlwhere);
        List<T> GetEntities(Field sqlwhere);
        List<T> GetEntities(string sqlwhere);

        bool Exists(Field sqlwhere);
        bool Exists(string sqlwhere);
        List<T> GetWebPagedListDesc(Field zhujian,Field sqlwhere);
        List<T> GetWebPagedListDesc(Field zhujian, Field sqlwhere,long sumcount);

        int ExecuteOneSql(string sqlwhere);

        DataSet ExecuteProToDataSet(List<System.Data.Common.DbParameter>  Parameter,string porname );
    }
}
